<?php

/**
 * Created by PhpStorm.
 * User: yanshinian@yeah.net
 * Date: 2019/5/22
 * Time: 17:51.
 * pdd.ddk.goods.search
 */
class DdkGoodsSearchRequest
{
    /**
     * @var INTEGER[]  商品活动标记数组，例：[4,7]，4-秒杀 7-百亿补贴等
     */
    private $activity_tags;
    /**
     * @var LONG  商品类目ID，使用pdd.goods.cats.get接口获取
     */
    private $cat_id;
    /**
     * @var int  自定义参数，为链接打上自定义标签；自定义参数最长限制64个字节；格式为： {"uid":"11111","sid":"22222"} ，其中 uid 用户唯一标识，可自行加密后传入，每个用户仅且对应一个标识，必填； sid 上下文信息标识，例如sessionId等，非必填。该json字符串中也可以加入其他自定义的key
     */
    private $custom_parameters;
    /**
     * @var LONG[] 商品ID列表。例如：[123456,123]，当入参带有goods_id_list字段，将不会以opt_id、 cat_id、keyword维度筛选商品
     */
    private $goods_id_list;
    /**
     * @var BOOLEAN  是否为品牌商品
     */
    private $is_brand_goods;
    /**
     * @var STRING  商品关键词，与opt_id字段选填一个或全部填写
     */
    private $keyword;
    /**
     * @var STRING  翻页时建议填写前页返回的list_id值
     */
    private $list_id;
    /**
     * @var INTEGER  店铺类型，1-个人，2-企业，3-旗舰店，4-专卖店，5-专营店，6-普通店（未传为全部）
     */
    private $merchant_type;
    /**
     * @var INTEGER 默认值1，商品分页数
     */
    private $page;
    /**
     * @var INTEGER 默认100，每页商品数量
     */
    private $page_size;
    /**
     * @var STRING 推广位id
     */
    private $pid;


    private $apiParas = array();

    public function setActivitytags($activity_tags)
    {
        $this->activity_tags = $activity_tags;
        $this->apiParas['activity_tags'] = $activity_tags;
    }

    public function getEliteId()
    {
        return $this->activity_tags;
    }

    public function setCatId($cat_id)
    {
        $this->cat_id = $cat_id;
        $this->apiParas['cat_id'] = $cat_id;
    }

    public function getCatId()
    {
        return $this->cat_id;
    }

    public function setCustomParameters($custom_parameters)
    {
        $this->custom_parameters = $custom_parameters;
        $this->apiParas['custom_parameters'] = $custom_parameters;
    }

    public function getCustomParameters()
    {
        return $this->custom_parameters;
    }

    public function setGoodsIdList($goods_id_list)
    {
        $this->goods_id_list = $goods_id_list;
        $this->apiParas['goods_id_list'] = $goods_id_list;
    }

    public function getGoodsIdList()
    {
        return $this->goods_id_list;
    }

    public function setIsBrandGoods($is_brand_goods)
    {
        $this->is_brand_goods = $is_brand_goods;
        $this->apiParas['is_brand_goods'] = $is_brand_goods;
    }

    public function getIsBrandGoods()
    {
        return $this->is_brand_goods;
    }

    public function setKeyword($keyword)
    {
        $this->keyword = $keyword;
        $this->apiParas['keyword'] = $keyword;
    }

    public function getKeyword()
    {
        return $this->keyword;
    }

    public function setListId($list_id)
    {
        $this->list_id = $list_id;
        $this->apiParas['list_id'] = $list_id;
    }

    public function getListId()
    {
        return $this->list_id;
    }

    public function setMerchantType($merchant_type)
    {
        $this->merchant_type = $merchant_type;
        $this->apiParas['merchant_type'] = $merchant_type;
    }

    public function getMerchantType()
    {
        return $this->merchant_type;
    }

    public function setPage($page)
    {
        $this->page = $page;
        $this->apiParas['page'] = $page;
    }

    public function getPage()
    {
        return $this->page;
    }

    public function setPageSize($page_size)
    {
        $this->page_size = $page_size;
        $this->apiParas['page_size'] = $page_size;
    }

    public function getPageSize()
    {
        return $this->page_size;
    }

    public function setSortType($sort_type)
    {
        $this->sort_type = $sort_type;
        $this->apiParas['sort_type'] = $sort_type;
    }

    public function getSortType($sort_type)
    {
        return $this->sort_type;
    }

    public function setPid($pid)
    {
        $this->pid = $pid;
        $this->apiParas['pid'] = $pid;
    }

    public function getPid()
    {
        return $this->pid;
    }



    public function getApiMethodName()
    {
        return 'pdd.ddk.goods.search';
    }

    public function getApiParas()
    {
        return $this->apiParas;
    }

    public function check()
    {
        
    }

    public function putOtherTextParam($key, $value)
    {
        $this->apiParas[$key] = $value;
        $this->$key = $value;
    }
}
